<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="oastaglib" prefix="oas"%>
<html>
<head>
    <title>Online Attendance System</title>
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/bootstrap/dist/css/bootstrap.min.css" /> ">
    <script type="text/javascript" src="<c:url value="/resources/js/jquery/dist/jquery.min.js"/>"></script>
    <script type="text/javascript" src="<c:url value="/resources/bootstrap/dist/js/bootstrap.min.js"/>"></script>
</head>
<body class="text-center" style="background-color: transparent">
<form method="POST" style="width: 300px; margin: 0 auto; margin-top: 270px" action="login">

    <h3>网上考勤系统</h3>
    <br/>
    <input type="text" name="userName" class="form-control" type="text" placeholder="请输入用户名" required="required"
           autofocus/>
    <input type="password" name="password" class="form-control" type="password" placeholder="请输入密码" id="pwd"
           required="required"/>
    <br/>
    <input type="submit" class="btn btn-primary btn-block" value="登录" onclick="encode()"/>
</form>

<script>
    function encode() {
        let password = document.getElementById('pwd');
        password.value = window.btoa(password.value);
        console.log(password.value);
    }
</script>

</body>
</html>
